#include "LightSceneNode.h"

CLightSceneNode::CLightSceneNode(IMaterial mat,vector3df32 nspotd,f32 spotco,ISceneNodeReceiveParams):
ILightSceneNode(ISceneNodeBasicParams),SpotDirection(nspotd),SpotCutOff(spotco)
{
}

CLightSceneNode::~CLightSceneNode()
{
}

void CLightSceneNode::Render(IDrawableFaceManager *dfm)
{
	rl.Update(this->GetPosition(),SpotDirection,SpotCutOff);
	dfm->AddToLightRenderList(&rl);
}

void CLightSceneNode::SetSpotDirection(vector3df32 nv)
{
	SpotDirection = nv;
}

void CLightSceneNode::SetSpotDirectionX(f32 nv)
{
	SpotDirection.X = nv;
}

void CLightSceneNode::SetSpotDirectionY(f32 nv)
{
	SpotDirection.Y = nv;
}

void CLightSceneNode::SetSpotDirectionZ(f32 nv)
{
	SpotDirection.Z = nv;
}

f32 CLightSceneNode::GetSpotCutOff()
{
	return SpotCutOff;
}

void CLightSceneNode::SetSpotCutOff(f32 nv)
{
	SpotCutOff = nv;
}
